
<%@page import="info.toegepaste.www.beans.Alumnus"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Resultaatpagina</title>
        <link rel="stylesheet" type="text/css" href="style.css"/>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
        <script src="jquery.dataTables.js"></script>
        <script type="text/javascript">
            $(document).ready(function() {
                $('#resultaten').dataTable({
                    "bPaginate": false,
                    "bInfo": false,
                    "bFilter": false
                });
            });
        </script>
    </head>
    <body>
        <a href="index.jsp"><h1>Alumni</h1></a>
        <h1>Zoekresultaten</h1>
        Indien u wenst te sorteren, klik op de tabelhoofden.
        <%ArrayList<Alumnus> alumni = (ArrayList<Alumnus>) request.getAttribute("alumni");%>
        <table border="1" id="resultaten">
            <thead>
            <th><a>Voornaam</a></th>
            <th><a>Achternaam</a></th>
            <th><a>Functie</a></th>
            <th><a>Richting</a></th>
            <th><a>Afstudeerjaar</a></th>
            <th></th>
        </thead>
        <tbody>
            <%for (Alumnus alumnus : alumni) {%>
            <tr>
                <td>
                    <%=alumnus.getVoornaam()%>
                </td>
                <td><%=alumnus.getAchternaam()%></td>
                <td><%=alumnus.getFunctie().getFunctienaam()%></td>
                <td><%=alumnus.getRichting().getRichtingnaam()%></td>
                <td><%=alumnus.getAfstudeerjaar()%></td>
                <td><a href="ZoekServlet?details=<%=alumnus.getAlumnusID()%>">Details</a></td>
            </tr>

            <%}%>
        </tbody>
    </table>
    <form action="ZoekServlet" method="post">
        <input type="submit" name="adminzoekButton" value="Terug">
    </form>
</body>
</html>
